﻿@model  IEnumerable<WebSoftSeo.Models.Blog>
<div class="listN">

    <h2 class="h1Sibar">Popular Articles</h2>
    <ul class="listBlog">
        @if (Model != null)
        {
            int i = 1;
            
            foreach (var item in Model)
            {
                string color = "colortest" + i.ToString();
                
            <li>
                @if(item.ImagePath != null)
                {
                <div class="imgBlog"><a href="@Url.RouteUrl("Blog", new {title = WebSoftSeo.Utility.HelperSEO.ToSeoUrl(item.Title), id = item.ID })">
                    <div class="maskN"></div>
                    <img src="~/Images/Blog/@item.ImagePath" style="height:70px"></a></div>
                <div class="testNew">
                    <h2><a class="@color" href="@Url.RouteUrl("Blog", new {title = WebSoftSeo.Utility.HelperSEO.ToSeoUrl(item.Title), id = item.ID })">@item.Title</a></h2>
                    <p class="giveMeEllipsis">@item.ShortDescription</p>
                </div>
                }
                else
                {
                     <div class="testNewNon">
                    <h2><a class="@color" href="@Url.RouteUrl("Blog", new {title = WebSoftSeo.Utility.HelperSEO.ToSeoUrl(item.Title), id = item.ID })">@item.Title</a></h2>
                    <p class="giveMeEllipsis">@item.ShortDescription</p>
                </div>
                }
                <div class="clearfix"></div>
            </li>
                i++;
            }
        }

    </ul>

</div>


